Command line switches
can specify a separate startup routine for each project.
You can use command line switches to specify
several options when you start the program. For example, you can
run a script, start with a specified drawing template, and display
a specified view when a drawing is opened. With command line switches,
you can also set up several program icons, each with different start-up
options.
Command line switches are parameters you can
add to the acad.exe command line associated
with a Microsoft® Windows®
shortcut icon or the Windows Run dialog box. You can include several
switches within a single command line. Valid switches are listed
in the following table.
/b
|
Script name
|
Designates a script to run after you start the program
(b stands for batch process). Scripts can be used to set up drawing
parameters in a new drawing file. An SCR file type is assumed.
|
/t
|
Template file name
|
Creates a new drawing based on a template or
prototype drawing. A DWT file type is assumed.
|
/c
|
Configuration folder
|
Specifies the path for the hardware configuration
file that you want to use. You can specify a directory or a particular
file. A CFG file type is assumed.
If
you don't set the /c switch, the executable directory is searched
and the ACADCFGW or ACADCFG environment variable is used as a way
to define the configuration file and directory location.
|
/v
|
View name
|
Designates a particular view of the drawing for
display at startup.
|
/ld
|
ARX
or DBX application
|
Loads
a specified ARX or DBX application. Use the following format:
<path>\<filename>.ARX If
the path or file name contains spaces, then the path or file name
should be wrapped in double quotes. If no path information is included,
the program search path is used.
|
/s
|
Support
folders
|
Designates
support folders other than the current folder. Drawing support files
include text fonts, menus, AutoLISP files, linetypes, and hatch
patterns. The maximum number of folders you can specify in the path
is 15. Each folder name is delimited by semicolons.
|
/r
|
Default
system pointing
device
|
Restores
the default system pointing device. It creates a new configuration
file (acad2010.cfg) and renames the
previous configuration file to acad2010.bak.
|
/nologo
|
No AutoCAD logo
screen
|
Starts
the program without first displaying the logo screen.
|
/p
|
User-defined
registry
profile
for starting the
program
|
Specifies
a user-defined registry profile for starting the program. The selected
profile is in effect only for the current session of the program,
unless you make another profile current in the Options dialog box
during that session.
You
create or import profiles on the Profiles tab in the Options dialog
box. With the /p switch, you can specify the name of a profile that
is listed in the Options dialog box or the file name of an exported
profile (ARG) file. If the profile does not exist, the current profile is
used.
|
/nohardware
|
Disables
hardware
acceleration
|
Disables
hardware acceleration on startup.
|
/nossm
|
No
Sheet Set Manager
window
|
Suppresses
the display of the Sheet Set Manager window on startup.
|
/set
|
Sheet
set
|
Loads
the named sheet set on startup. Use the following format:
<path>\<sheet
set data file>.DST
|
/w
|
Default workspace
|
Designates which workspace in the loaded CUIx
files should be restored on startup.
|
/pl
|
Background plotting/publishing
|
Publishes a drawing set descriptions (DSD) file
in the background. Use the following format:
<path>\<drawing set descriptions file>.DSD
|
The syntax for using command line switches
is
"drive:pathname\acad.exe" ["drawingname"]
[/switch "name"]
When using a switch option, you must follow
the switch with a space and then the name of a file, path, or view
within quotation marks. For example, the following entry starts
the program from a folder named AutoCAD 2011 with
the drawing template arch1.dwt, restores
a named view PLAN1, and executes a script file startup.scr.
"d:\AutoCAD 2011\acad.exe”/t "d:\AutoCAD 2011\template\arch1"
/v "plan1" /b "startup"
The
environment settings are resolved in the following way:
- If you use a command
line switch to specify an environment setting, the command line
switch overrides the settings specified in either the Options dialog
box or the environment variable.
- If a command line switch is not set,
the corresponding value set in the Options dialog box is used.
- If neither a command
line switch nor an Options value is set, the environment variable
value is used.
NoteCommand
line switches and environment variables override values set in the
Options dialog box for the current session only. They do not alter
the system registry.
To start the program with
a command line switch
- Right-click the program icon on the Windows
desktop. Click Properties.
- In the AutoCAD Properties dialog box,
Shortcut tab, in the Target box, edit the parameters for the switch
using the following syntax:
"drive:pathname\acad.exe" ["drawing name"]
[/switch "name"]
Valid switches are as follows:
/b
|
Script name (b stands for
batch process)
|
/t
|
Template file name
|
/c
|
Configuration folder
|
/v
|
View name
|
/s
|
Support folders
|
/r
|
Default system pointing device
|
/nologo
|
No AutoCAD logo screen
|
/nohardware
|
Disables hardware acceleration
|
/p
|
User-defined registry
profile
|
/nossm
|
No Sheet Set Manager window
|
| /set |
Sheet Set name
|
/w
|
Default workspace
|
/pl
|
Background plotting/publishing for a Drawing
Set Descriptions (DSD) file
|
For example, enter "d:\AutoCAD 2011\acad.exe" /t "d:\AutoCAD 2011\template\arch1"
/v "plan1" /b "startup"
- Click OK.